export interface User {
  id: number;
  name: string;
  email: string;
  role: string;
}

// 认证相关类型
export interface AuthUser {
  id?: number;
  username: string;
  role?: string;
  isAuthenticated: boolean;
}

export interface LoginRequest {
  username: string;
  password: string;
}

export interface LoginResponse {
  success: boolean;
  message: string;
  user?: {
    id: number;
    username: string;
    role: string;
    loginTime: string;
  };
}

export interface ApiResponse {
  users: User[];
  success: boolean;
}

// Chat types
export interface ChatMessage {
  id: string
  role: 'user' | 'assistant'
  content: string
  timestamp: Date
}

export interface ChatState {
  messages: ChatMessage[]
  isLoading: boolean
  error: string | null
}

export interface ChatSession {
  id: string;
  title: string;
  messages: ChatMessage[];
  createdAt: Date;
  updatedAt: Date;
}
